﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;

using InfFront.UICore;
using InfFront.InfoSources.Base;
using InfFront.InfoViews.Base;

namespace InfFront.InfoViews.WPF.Settings
{
    internal partial class BaseSettingsInfoSource : SingleObjectInfoSource
    {
        #region Private Variables
        #endregion Private Variables

        public BaseSettingsInfoSource()
        {
            InitializeComponent();
        }

        public BaseSettingsInfoSource(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }

        private void cmdResetAll_OnExecute(object sender, InfoCommandExecArgs args)
        {
            var accessor = (SettingsAccessor)((BaseInfoViewEntity) args.CurrentItem).VisualSettings;
            accessor.ResetAll();
            BeginRefresh();
        }
    }
}
